# -*- coding: utf-8 -*-
#!/usr/bin/env python

import pexpect
import sys

child = pexpect.spawn('rsync -vzrtopg --delete --progress /home/oracle/dump/ root@192.168.XXX.XXX:/home/oracle_XXXdump/')
logfile123 = file('rsync.log','w')
child.logfile =  logfile123
    
child.expect(["password:"])
child.sendline("XXXXXXX")
child.expect("#")
    

    
